home *** CD-ROM | disk | FTP | other *** search
- Path: brushtail.hna.com.au!kumear!Stewart_Menday
- From: Stewart_Menday@kumear.DIALix.oz.au (Stewart Menday)
- Newsgroups: comp.sys.amiga.programmer
- Subject: C++ Classes
- Distribution: world
- Message-ID: <Stewart_Menday.3jrp@kumear.DIALix.oz.au>
- Date: 14 Apr 96 15:46:29 EST
- Organization: The DUNGEON BBS, Newcastle, Australia.
-
- Hi ALL
- I have a question about C++ and calling functions which have been
- overriden.
-
- If I have a class x say and it is derived from class y say and they both a
- method print() say. How do I call class y print from within class x?
-
- e.g.
-
- y.h
-
- class y{
- public:
- void print();
- \
- /
- \
- /
-
- }
-
- x.h
-
- class x:public y{
- public:
- void print();
- \
- /
- \
- /
- }
-
- x.cc
-
- void x::print();
- {
- //some stuff for x
-
- //I wish to call y.print
- }
-
- Any help would be great.
-
-
- Stew
-
- -- Via DLG Pro v1.1
-
-